//HEADER FILE
#ifndef MAP_H
#define MAP_H

#include <nds.h>
#include "fixed.h"
#include "camera.h"

//Map
//#include "Maps2.h"
//#include "Maps5.h"
#include "level1.h"
#include "level2.h"
#include "level3.h"
#include "level4.h"

//Backgrounds
#include "cave.h"
#include "SpringBackground.h"
#include "FallBackground.h"
#include "SummerBackground.h"
#include "WinterBackground.h"

//Subcreen Images
#include "forest.h"


#include "reference.h"
//#include "levelone.h"
#include "levelOneMetaData.h"
#include "levelTwoMetaData.h"
#include "levelThreeMetaData.h"
#include "levelFourMetaData.h"

static const int DmaChannel = 3;

//define tile size
static const int tileSize = 16;
//define tile height and width of map in tiles
static const int mapWidth = 400;
static const int mapHeight = 60;
//static const int mapWidth = 16;
//static const int mapHeight = 16;
class map{
	private:
	metaTile metaData[mapWidth][mapHeight];
	t2DVector mapSize;

	u16* levelMap;
	

	public:
	map();
	~map();

	void DisplayMap(const void * src,uint32 size,const void *src1,uint32 size1,const void *src2,uint32 size2);
	void loadMetaData(int level);
	void displayBackground(const void * src,uint32 size);
	void displaySubScreen(const void * src,uint32 size);
	void loadCurrentScreen(t2DVector camera);
	void updateMap(t2DVector camera);
	void setMap(u16* newMap);
	metaTile returnTile(int indexX,int indexY);
	//int returnBoundBox(int indexX,int indexY);
	int returnCollideable(int indexX,int indexY);
	int returnIcy(int indexX,int indexY);
	t2DVector getMapSize();
};

#endif